With the development of electronic technologies and the increase of user requirements, criteria for determining advantages and disadvantages of electronic products are currently not limited to hardware specifications and technical specifications, but focusing on user experience and feelings is key for vendors to gain market. Many existing electronic products such as a mobile phone, a tablet, an MP3, an MP4, and a game machine can perform a corresponding operation according to a user's corresponding action. For example, when the user flips a machine body, a screen is automatically flipped; when the user shakes the machine body, an interface, a song or a video is switched; when the user tilts the machine body, an image on the screen moves accordingly; and in a car racing game, a racecar direction on a screen is controlled by swinging the machine body to the left and right by the user. These electronic products significantly improve the user experience compared with previous electronic products that can only be operated by using a keyboard or a touchscreen.
In the prior art, a method for implementing the foregoing functions is commonly based on a gravity sensing principle, that is, the piezoelectric effect is used to determine a direction by measuring values of component forces of gravity in two orthogonal directions for a sheet of weight (currently, a gravity sensing chip is commonly used inside an electronic product, and the weight and a piezoelectric patch are made into a whole) inside the electronic product, thereby determining an action of a user. A defect of gravity sensing is that a product needs to be used within a sphere of gravity, and these functions are lost after the product is out of the sphere of gravity.